package com.ruoyi.eqmonitor.domain;

import java.util.Objects;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 设备监控配置对象 opt_device_monitor_config
 * @author ruoyi
 * @date 2022-11-26
 */
public class OptDeviceMonitorConfig extends BaseEntity{

    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
	@TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /** 设备编码 */
    @Excel(name = "设备编码")
    private String deviceCode;

    /** 报警项code */
    @Excel(name = "报警项code")
    private String alarmCode;

    @TableField(exist=false)
    @Excel(name = "报警项名称", dictType = "opt_device_monitor_quota")
    private String alarmCodeLabel;

    /** 预警阈值 */
    @Excel(name = "预警阈值")
    @TableField(insertStrategy= FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
    private Double alarmValue;

    /** 上限值 */
    @Excel(name = "上限值")
    @TableField(insertStrategy= FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
    private Double upperLimit;

    /** 下限值 */
    @Excel(name = "下限值")
    @TableField(insertStrategy= FieldStrategy.IGNORED, updateStrategy = FieldStrategy.IGNORED)
    private Double floorLimit;

    /** 是否启用 */
    @Excel(name = "是否启用",readConverterExp = "0=启用,1=停用")
    private String isUse;

    /** 备注 */
    @TableField(exist = false)
    @Excel(name = "备注")
    private String remark;

    /** 报警类型 */
    @Excel(name = "报警类型", dictType = "opt_device_alarm_type")
    private String alarmType;

    /** 报警现象 */
    @Excel(name = "报警现象", dictType = "opt_device_alarm_phenomenon")
    private String alarmPhenomenon;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setDeviceCode(String deviceCode)
    {
        this.deviceCode = deviceCode;
    }

    public String getDeviceCode()
    {
        return deviceCode;
    }

    public void setAlarmCode(String alarmCode)
    {
        this.alarmCode = alarmCode;
        this.alarmCodeLabel = alarmCode;
    }

    public String getAlarmCode()
    {
        return alarmCode;
    }

    public String getAlarmCodeLabel() {
		return alarmCodeLabel;
	}

	public void setAlarmCodeLabel(String alarmCodeLabel) {
		this.alarmCodeLabel = alarmCodeLabel;
	}

	public void setAlarmValue(Double alarmValue)
    {
        this.alarmValue = alarmValue;
    }

    public Double getAlarmValue()
    {
        return alarmValue;
    }
    public void setIsUse(String isUse)
    {
        this.isUse = isUse;
    }

    public String getIsUse()
    {
        return isUse;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getAlarmType() {
        return alarmType;
    }

    public void setAlarmType(String alarmType) {
        this.alarmType = alarmType;
    }

    public String getAlarmPhenomenon() {
        return alarmPhenomenon;
    }

    public void setAlarmPhenomenon(String alarmPhenomenon) {
        this.alarmPhenomenon = alarmPhenomenon;
    }

    public Double getUpperLimit() {
        return upperLimit;
    }

    public void setUpperLimit(Double upperLimit) {
        this.upperLimit = upperLimit;
    }

    public Double getFloorLimit() {
        return floorLimit;
    }

    public void setFloorLimit(Double floorLimit) {
        this.floorLimit = floorLimit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OptDeviceMonitorConfig that = (OptDeviceMonitorConfig) o;
        return Objects.equals(id, that.id) && Objects.equals(deviceCode, that.deviceCode) && Objects.equals(alarmCode, that.alarmCode) && Objects.equals(alarmValue, that.alarmValue) && Objects.equals(upperLimit, that.upperLimit) && Objects.equals(floorLimit, that.floorLimit) && Objects.equals(isUse, that.isUse) && Objects.equals(remark, that.remark) && Objects.equals(alarmType, that.alarmType) && Objects.equals(alarmPhenomenon, that.alarmPhenomenon);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, deviceCode, alarmCode, alarmValue, upperLimit, floorLimit, isUse, remark, alarmType, alarmPhenomenon);
    }

    @Override
    public String toString() {
        return "OptDeviceMonitorConfig{" +
                "id=" + id +
                ", deviceCode='" + deviceCode + '\'' +
                ", alarmCode='" + alarmCode + '\'' +
                ", alarmValue=" + alarmValue +
                ", upperLimit='" + upperLimit + '\'' +
                ", floorLimit='" + floorLimit + '\'' +
                ", isUse='" + isUse + '\'' +
                ", remark='" + remark + '\'' +
                ", alarmType='" + alarmType + '\'' +
                ", alarmPhenomenon='" + alarmPhenomenon + '\'' +
                '}';
    }
}
